package vip.source.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import vip.source.components.OssTemplate;

/**
 * @author zy
 */
@AutoConfiguration
@ConditionalOnClass(OssTemplate.class)
@EnableConfigurationProperties(value = OssProperties.class)
public class OssAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    public OssTemplate ossTemplate() {
        return new OssTemplate();
    }
}
